package com.zf.yichat.model;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;

@Table(name = "message_ultragroup")
public class MessageUltragroup implements Serializable {

    // 有效
    public static final Integer STATUS_0 = 0;
    // 无效
    public static final Integer STATUS_1 = 1;

    // 需要审核
    public static final String APPROVAL_0 = "0";
    // 不需要审核
    public static final String APPROVAL_1 = "1";

    @Id
    private Long id;

    @Column(name = "ultragroup_id")
    private String ultragroupId;

    @Column(name = "ultragroup_name")
    private String ultragroupName;

    @Column(name = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @Column(name = "ultragroup_id_num")
    private Long ultragroupIdNum;

    // 群头像
    private String avatar;

    // 是否需要审核
    private String approval;

    private Integer status;

    private static final long serialVersionUID = 1L;

    public MessageUltragroup(Long id, String ultragroupId, String ultragroupName,
                             Date createTime, Long ultragroupIdNum,String avatar,String approval, Integer status) {
        this.id = id;
        this.ultragroupId = ultragroupId;
        this.ultragroupName = ultragroupName;
        this.createTime = createTime;
        this.ultragroupIdNum = ultragroupIdNum;
        this.avatar = avatar;
        this.approval = approval;
        this.status = status;
    }

    public MessageUltragroup() {
        super();
    }

    /**
     * @return id
     */
    public Long getId() {
        return id;
    }

    /**
     * @param id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @return ultragroup_id
     */
    public String getUltragroupId() {
        return ultragroupId;
    }

    /**
     * @param ultragroupId
     */
    public void setUltragroupId(String ultragroupId) {
        this.ultragroupId = ultragroupId == null ? null : ultragroupId.trim();
    }

    /**
     * @return ultragroup_name
     */
    public String getUltragroupName() {
        return ultragroupName;
    }

    /**
     * @param ultragroupName
     */
    public void setUltragroupName(String ultragroupName) {
        this.ultragroupName = ultragroupName == null ? null : ultragroupName.trim();
    }

    /**
     * @return create_time
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * @param createTime
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * @return ultragroup_id_num
     */
    public Long getUltragroupIdNum() {
        return ultragroupIdNum;
    }

    /**
     * @param ultragroupIdNum
     */
    public void setUltragroupIdNum(Long ultragroupIdNum) {
        this.ultragroupIdNum = ultragroupIdNum;
    }


    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getApproval() {
        return approval;
    }

    public void setApproval(String approval) {
        this.approval = approval;
    }

    /**
     * @return status
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * @param status
     */
    public void setStatus(Integer status) {
        this.status = status;
    }
}